/**
 * @ author: 汪孟苹
 */
define([],function(){
	var tpl = {};
    
	tpl.init = function(){
		var html = "";
		html += autocomplete();
		return html;
	}
	tpl.init2 = function(){
		var html = "";
		html += list();
		return html;
	}

	var autocomplete = function(){
		return 	'<scprit id="tpl_surveyStage_autocomplete" type="text/html">'+
				'	<div class="surveyStageModel-wrap">'+
				'		<div class="input-group searchBox">'+
				'	      	<input type="text" class="form-control" placeholder="根据姓名和手机号码查询">'+
				'			<div id="searchResult" class="searchResult"></div>'+
				'	      	<span class="input-group-addon">'+
				'	        	<i class="fa fa-times"></i>'+
				'	      	</span>'+
				'	    </div>'+
				'	</div>'+
				'</scprit>';
	}
	var list = function(){
		return 	'<script id="tpl_surveyStage_patients" type="text/html">'+
				'{{if rows.length > 0}}'+
				'	<ul>'+
				'		{{each rows as value i}}'+
				'		<li class="patient-item" patientId="{{value.patientId}}">'+
				'			<span class="patient-name">{{value.patientName}}</span>（{{value.phoneNum}}）'+
				'			{{if value.sexShow}}'+
				' 			{{if value.gender == "F"}}'+
				'				<span class="girl">女孩</span>'+
				'			{{else}}'+
				'				<span class="boy">男孩</span>'+
				'			{{/if}}'+
				'			{{/if}}'+
				'		</li>'+
				'		{{/each}}'+
				'	</ul>'+
				'{{else}}'+
				'	<div class="searchResult-null">您所搜索的患者没有建档！</div>'+
				'{{/if}}'+
				'</script>';
	}

	return tpl;
});